-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BlockSchema HTTP client and struct model #180
Conversation
…t into 172-add-blockschema
Uncomments BlockSchema under the BlockDocument struct now that it's implemented. Context: https://github.com/PrefectHQ/terraform-provider-prefect/pull/178/files#r1619674856
Was getting an error from
I suspect this came from #178, but surprised pre-commit / CI didn't complain about it. Do you get this error locally, too @parkedwards? I did kind of wonder how the unmarshaling would work since we don't have struct tags on those types 🤔 |
@mitchnielsen what the heck - so when I was dev-ing on #178 , I did run into this linting error the issue is actually with this struct, but it's (1) nested in the i think i upgraded my golangci-lint binary to get around this - what version are you running?
|
Ah interesting, I have this version from Homebrew (which it says is the latest available to it):
I've been thinking we might benefit from using |
https://golangci-lint.run/product/changelog/#1582:
https://github.com/go-simpler/musttag/releases/tag/v0.12.2: go-simpler/musttag@5b5f6e3 fix: check whether a pointer-type implements a Marshaler interface (go-simpler/musttag#94) That seems to be what fixed it, since updating to |
ok phew, my sanity is restored 💆 |
Renames the argument to match the type. Co-authored-by: Edward Park <[email protected]>
Rather than inheriting the fields from BlockType into BlockSchema, we want to actually embed a BlockType into BlockSchema. This fixes that by typing that field as BlockType and specifying the struct tag for it.
Closes #172